home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 3 / Info_Mac_1994-01.iso / Text Processing / Easy View 2.3.3 / Easy View Notes < prev   
Text File  |  1993-05-01  |  25KB  |  496 lines

  1. Views
  2.  
  3. A view is a collection of text files, combined for easy viewing. The file contents are displayed in two levels, called chapters and sections in these notes. Every view has at least one chapter, each containing one or more sections. Views can be created, opened, and modified within Easy View. Simple printing of sections is supported.
  4.  
  5. Once a view is open, the left pane shows the chapters and the right pane shows the sections in the view. The current chapter and the current section are highlighted in the respective lists. The name of the open file is shown at the bottom of the window. More information about the open file will be displayed if the mouse is clicked on the file name.
  6.  
  7. This view, "Easy View - Read Me", combines two text files: "Easy View Introduction" and "Easy View Notes", as indicated on the upper-right pane.
  8.  
  9. ----------
  10. Format
  11.  
  12. The format of a view defines the chapters and sections contained in the files. It is, in general, indicated by separation lines that are made up of identical characters, like hyphens or asterisks. The formats that are currently recognized by Easy View are explained below:
  13.  
  14. **Plain:** This is in fact "no format at all". The whole file becomes a single section. The only chapter and section are both named after the file.
  15.  
  16. **Simple:** Sections are separated by hyphens and chapters by asterisks. The first line in each chapter or section is assumed to be its name. (This file is an example of simple format.)
  17.  
  18. **setext:** Sections are separated by hyphens and chapters by equal signs. Unlike the simple format, the names _precede_ the separation lines. Moreover, the apparent length of the name and its separator must be the same. This makes setext slightly more difficult to enter manually, but much more robust in comparison to Simple format. (Weekly TidBITS issues and the "Easy View Introduction" file are examples of setext format.) 
  19.  
  20. **Digest:** This is basically for e-mail digests, like Info-Mac or Simulation Digest. The format is similar to #2 above. The chapters correspond to different digests, and the sections to the articles. The names for the chapters and the section are found in the digest itself, using a set of configuration strings. Similar digest formats are configurable.
  21.  
  22. **Mail:** Various collections from different e-mail systems are supported. The configurable string indicates the separation of mail items in the file. This format has the limitation of only one chapter per file, and the file name is used as the name of the corresponding chapter. Sample views include Internet mail, Rice Notebook, and CompuServe Navigator formats. Other formats can be configured easily.
  23.  
  24. **Dictionary:** The file contains a listing of words along with their explanations, in alphabetical order. Each line is a section, the name is the first word of the line. Chapters correspond to the letters of alphabet, combining all words starting with a given letter.
  25.  
  26. Caution: Files of different formats can be mixed in a single view, such as this one. However, it is strongly recommended that a single format is used throughout the view.
  27.  
  28. ----------
  29. New view
  30.  
  31. When the user selects "New…" from the File menu, a standard file dialog is presented, and the user makes an empty view, in a folder of his choice. Untitled views are never created, because the folder  for each view must be known, within which the files will reside.
  32.  
  33. When the empty view appears, it is ready for modifications.
  34.  
  35. ----------
  36. Modifying a view
  37.  
  38. "Modify View…" command can be used on an open view. It presents the modification dialog with which files are added into or removed from the view. The first action should be making sure that the proper format appears in the pop-up menu. 
  39.  
  40. The file list on the left-hand side shows all the text files in the current folder, not included in the view. They can be added one by one with the ">" button (or the Return key), or all at once with the ">>>" button. It is recommended that a single file is tried first, and then ">>>" is used after the format turns out to be correct.
  41.  
  42. The files that are selected will be analyzed one at a time. This process may be terminated by pressing the mouse key or <command><period> as usual. This results in the last added file being removed.
  43.  
  44. It is also possible to remove files from the view by the "<" or "<<<" buttons. The user may select a file on the right-hand side for removal. All the chapters in the selected file will be removed _from the view_, not from the disk. (This is not a "delete" command.) 
  45.  
  46. The modification process marks the view "changed", a state which will be cleared by "Save" or "Revert" commands. If "Auto Save" option is checked, the view is immediately saved upon the exit from the dialog. In this case, Save and Revert operations will never be possible.
  47.  
  48. It should be emphasized that the text files are _never_ modified by this process.
  49.  
  50. ----------
  51. Auto Modify
  52.  
  53. One of the most useful user options, this makes the modification process mostly transparent to the user. Three types of auto-modification are supported:
  54.  
  55. **Auto-modify view** 
  56. The modification date of the text file will be checked and the view will be modified if necessary. This check will be done on _every_ read operation.
  57.  
  58. **Include all files in the folder** 
  59. The view file under consideration is assumed to be alone in a private folder, with all the text files it combines. Whenever a new file enters the folder, dragged by the user or saved by another application, it is automatically added to the view. The current format is used in the process. 
  60.  
  61. **Remove files not found** 
  62. If a file is deleted or otherwise moved out of the folder, it is immediately removed from the view. 
  63.  
  64. For the last two cases, the directory will only be checked when a view is activated in the front. The views at the back are never affected.
  65.  
  66. ----------
  67. Disk vs. memory
  68.  
  69. The view data contains only names and pointers to sections. Thus, it is stored always in the memory when a view is opened. The files, however, can be arbitrarily large. Only one file is open (read-only) at a given time and only one section is read into the memory. Because of TextEdit restrictions, the _displayed_ portion of a given section cannot exceed 32K bytes.
  70.  
  71. During the modification of the view, the whole file is read into the memory (if possible) for fast processing. This may impose a practical limit on the individual files. If failure occurs in "Modify…" command, try increasing the memory allocated to the application, or dividing the larger files into smaller parts. 
  72.  
  73. Easy View will work within a Finder partition of 300K, but only very small files can be added in that case. (Unless System 7 can allocate the required amount of temporary memory)
  74.  
  75. The number of sections in a view is limited by 32K, practically unlimited for most needs. The number of chapters cannot exceed 1480.
  76.  
  77. The size of the view can be calculated as follows:
  78.        22 bytes per file
  79.        14 bytes per chapter
  80.        10 bytes per section
  81. Add to this, the total length of all file, chapter, and section names, and about 500 bytes of overhead.
  82.  
  83. ----------
  84. Modified files
  85.  
  86. If some files in a view are modified outside the application, the appearance within Easy View will be damaged. In this version, there are two ways to correct the appearance: remove the file in the Modify dialog and add it again, or close the view and make a new view with the same name. In both cases, the preferences will be retained.
  87.  
  88. If some files in a view are moved, renamed, or deleted, Easy View has no way of locating them. The view itself can be renamed safely. The view can be moved, provided that all its files are also moved to the same folder. An open view should not be moved or renamed.
  89.  
  90. ----------
  91. TidBITS & Info-Mac
  92.  
  93. Two folders are included along with Easy View: one for TidBITS and one for Info-Mac archives. These folders can be freely put elsewhere on the disk. Once a file is downloaded, it should be put into the respective folder. The file will to be added _automatically_ into the view. These two types of files require no modification after downloading, the e-mail headers will be ignored. 
  94.  
  95. Caution: if you are downloading files, make sure that you do not activate the view before the file transfer is complete. Otherwise, Easy View will work on incomplete files. 
  96.  
  97. The views supplied with Easy View have the correct settings, that works best for the compact screens. You may use the Preferences dialog to change the settings.
  98.  
  99. **********
  100. Browsing
  101.  
  102. Easy View opens the files in the view in a read-only state, with no intention of modifying them. Thus, the usual editing commands Cut, Paste, and Clear are not available. The only allowed editing operation is Copy command, which puts the selected text into the clipboard. The usual Copy operation and the text entry in the dialog boxes are undoable. 
  103.  
  104. Two ways of clipping text are supported: The user may add any selected text or the current section into a text file. Alternatively, all the occurrences of a search string can be extracted by a single command. Both of these operations create new files by default, existing files may be used optionally. Clipping and extracting to text files are not undoable.
  105.  
  106. ----------
  107. Copy and Clip
  108.  
  109. A user may want to deal with complete sections, rather than selections. "Copy Section" command puts the current section into the clipboard without explicitly selecting the text. This is equivalent to "Select All", then "Copy", and then restore old selection.
  110.  
  111. As another convenience to the user, "Open Clip File…" command opens an output file for further clipping operations. When used, subsequent clip operations will write the selected text or the whole section into that file. All clipping goes to that file until the program termination or being closed by the user.
  112.  
  113. The default file selection routine makes a new text file. If the option or shift keys are pressed when the mouse is released on the menu, an existing text file will be opened in Append mode. (cf. "Extract to…")
  114.  
  115. ----------
  116. Search
  117.  
  118. A simple "Find…" command and its derivatives are supported. The basic search engine is the Munger in ROM, which can handle only case-sensitive search.
  119.  
  120. Beginning with EV 2.3, three filters are used for configurable searching:
  121. * E —> e :  ignore case
  122. * ê —> e :  ignore accents
  123. * É —> e :  ignore both
  124. More filters can be defined for other languages using Easy Convert, another freeware by the author.
  125.  
  126. As a non-standard feature, each view may have its own search string. This turns out to be rather useful in many cases, especially when different languages or scripts are in use. 
  127.  
  128. Searching may be terminated by pressing <command><period> or the mouse key as usual.
  129.  
  130. ----------
  131. Extract
  132.  
  133. All the occurrences of the current search string will be written to a text file. The default behavior is to extract the line of occurrence along with the chapter name. Optionally, the whole section may be extracted. With setext and digest formats, the resulting file will also have the correct section separators.
  134.  
  135. The default file selection routine makes a new text file. If the option or shift keys are pressed when the mouse is released on the menu, an existing text file will be opened in Append mode. (cf. "Clip to…")
  136.  
  137. Extracting may be terminated by pressing <command><period> or the mouse key as usual.
  138.  
  139. ----------
  140. Movable Modal Dialogs
  141.  
  142. There are five dialogs in Easy View, all having the same "non-standard" behavior: Modify, Preferences, Configuration, Find, and Style dialogs.
  143.  
  144. These dialogs behave like the Movable Modal Dialogs of System 7. The same behavior will be observed even in the earlier systems.
  145.  
  146. When one of these dialogs is active, switching to another application is possible. Edit menu will be active, only if there is an editable item. Escape key and <command><period> are equivalent to Cancel or Done buttons, all dismissing the dialog properly.
  147.  
  148. ----------
  149. Printing and Editing
  150.  
  151. Printing is supported only when styles are off. Only the current section will be printed. "Print One" allows standard printing without the dialog.
  152.  
  153. Easy View is an application strictly for browsing. Text files are opened read-only, with no intent to modify them. However, under System 7, an Apple event could be sent to the Finder to open the current file, from the menu or by pressing the "E" button at the lower left corner of the window. The effect is the same as opening the file in Finder.
  154.  
  155. ----------
  156. Windows
  157.  
  158. EV windows can be hidden using the last menu. The effect is similar to closing the window. View name for hidden windows will appear in the menu in italic type face. Such views are retained in memory, but not displayed.
  159.  
  160. Clipboard is always the first window.
  161.  
  162. "Stack Windows" command will arrange the visible windows, except the clipboard, in the order of opening. Only the position will be changed, not the window size.
  163.  
  164. **********
  165. Navigation
  166.  
  167. Five ways of navigation are available:
  168.  
  169. * Mouse (this works as expected, so it needs no further explanation)
  170.  
  171. * "Go" menu
  172.  
  173. * Numeric keypad
  174.  
  175. * Keyboard
  176.  
  177. * Special keys
  178.  
  179. ----------
  180. "Go" menu
  181.  
  182. The text is displayed in three levels: chapters, sections, pages. Each of these levels has a vertical scroll bar. "Go" menu provides a quick way to go to the extremes of the scroll bars.
  183.  
  184. For those who prefer the keyboard shortcuts, almost all the items in this menu have numeric command key equivalents, making the keypad handy for navigation.
  185.  
  186. ----------
  187. Numeric keypad
  188.  
  189. The numeric keypad can be used for scrolling the two lists or the text itself. Without the command key, 7-8-9 row works as "Scroll forward" and 1-2-3 row as "Scroll back". The leftmost keys scroll chapters, the middle keys scroll sections, and the rightmost keys scroll pages.
  190.  
  191. With the command key, the same sets of keys have different functions, as explained in the "Go" menu: 7-8-9 row works as "First ..." and 1-2-3 row as "Last ...".
  192.  
  193. These keys never cross the boundaries of the chapters and sections.
  194.  
  195. 0 (zero) key displays the previous position, quite useful after a Find command or when a wrong key is pressed by mistake.
  196.  
  197. ----------
  198. Keyboard
  199.  
  200. Since this is a browsing utility rather than an editor, the keyboard is available for entering commands. A few keys have special meanings:
  201.  
  202.   Space  Continue forward
  203.     b    Continue backward
  204.     t    Scroll to first page of current section (same as <command>9)
  205.     n    Next section (same as down arrow)
  206.     p    Previous section (same as up arrow)
  207.  
  208. These keys behave similar to the "rn" of unix. With the exception of "t", they may cross the chapter and section boundaries, if required. Thus, the Space key is very convenient for reading the file in a sequential fashion, using "b" or "n" once in a while.
  209.  
  210. With the command key, these keys either change their meaning completely or don't do anything. In that case, they become shortcuts for menu selection, as indicated on the respective menus.
  211.  
  212. ----------
  213. Special keys
  214.  
  215. PgUp and PgDn keys scroll page up and down in the current section. With the command key, they display first and last pages. (Equivalent to 9/3 keys)
  216.  
  217. Up and down arrows change the current section. These keys may cross the chapter boundaries, if required. With the command key, they display first and last sections, respectively. (Similar to 8/2 keys)
  218.  
  219. Left and right arrows change the current chapter. With the command key, they are reserved for Script Manager. (Similar to 7/1 keys)
  220.  
  221. Home and End keys display first and last pages, respectively. With the command key, they display first and last chapters.
  222.  
  223. ----------
  224. Bookmark
  225.  
  226. A single bookmark is maintained for each view. The last position is also saved after most navigation commands. These two positions are saved along with the preferences.
  227.  
  228. **********
  229. Preferences
  230.  
  231. Easy View handles the user options in two categories: view preferences are saved with the view, default preferences are written into the System Preferences folder.
  232.  
  233. ----------
  234. View preferences
  235.  
  236. For each view, the information indicated below will be stored. This information will be written into the resource fork when the view is saved or closed, only if the user has modified the current values. This information will also be written when they are changed by the Preferences dialog.
  237.  
  238. * A set of options in the form of checkboxes (see the next section)
  239. * File format (Pop-up menu)
  240. * Signature for "Clip to…" and "Extract to…" files
  241.   (MSWD for MS Word, NISI for Nisus, etc)
  242. * Vertical spacing in pixels (used only in styled text)
  243.  
  244. ----------
  245. Options in the Prefs Dialog
  246.  
  247. Below is an explanation of the action taken when a checkbox is _checked_.
  248.  
  249. **Auto-modify view:** check the modification date of the _text_file_ and modify the view if necessary. In order not to mix the two functions, this option is not in effect upon activation, until the text file is opened. (Again on purpose, this option does not activate auto-save)
  250.  
  251. **Include all files:** make sure that every text file in the folder is included in the view, by checking the folder modification date upon each activation.  (This was named auto-modify in the previous versions)
  252.  
  253. **Remove files not found:** check the folder modification date upon each activation, and remove files not found in the folder.
  254.  
  255. **Save after modifications:** save the view after any modification, manual or automatic.
  256.  
  257. **Private search string:** keep the search string for this view private.
  258.  
  259. ----------
  260. Default preferences
  261.  
  262. Default preferences can be setup in the Preferences dialog in two ways: when no view window is open or when the Clipboard is the active window.
  263.  
  264. All the view preferences has default values. 
  265.  
  266. ----------
  267. Configuration
  268.  
  269. This dialog was added for configuring digest and mail formats.  (The dialog will appear if the option key was pressed when the Preferences menu is chosen) It is recommended that the beginners do not modify these strings. 
  270.  
  271. **Digest Data:** Strings that mark the beginning and the end of a digest are included. Chapter name is a bit tricky: it indicates the column numbers in the form of chars. It should be entered with ResEdit or similar utility.
  272.  
  273. **Mail Data:** The only string here is the one that separates various mail items. The remainder of the line is used as subject or sender, if either is missing.
  274.  
  275. **Section Name:** This set of buttons indicate how the sections are to be named.
  276.  
  277. ----------
  278. Styles
  279.  
  280. For each view, the information indicated below will be stored. This information will be written into the resource fork when the view is saved or closed, only if the user has modified the current values. This information will also be written when they are changed by the Styles dialog.
  281.  
  282. * Appearance of the normal text: font and size
  283. * Appearance of the lists: font, size, and justification
  284. * setext styles: used for emphasis and quotations
  285.  
  286. The user should press a radio button to select a particular style. The Font and Style menus, as well as the Type Face radio buttons, can be used for changing that style.
  287.  
  288. When the Styles dialog is not shown, Font and Size menus apply only on the normal text.
  289.  
  290. **********
  291. Version history
  292.  
  293. Easy View was designed in 1990 in order to read Inside Macintosh more efficiently. Other formats were included in 1992.
  294.  
  295. Here is a summary of the growth of the application, beginning with version 2.0.
  296.  
  297. ----------
  298. EV 2.0  July 92
  299.  
  300. * New file format that allows longer chapter and section names
  301.  
  302. * Preferences are saved in the resource fork
  303.  
  304. * Defaults are saved in the Preferences file
  305.  
  306. * Movable Modal Dialogs are implemented
  307.  
  308. * Names are compared using IUEqualString, rather than string comparison
  309.  
  310. * Better parsing for setext and digest formats
  311.  
  312. * "Remove" button is added to the Modify dialog
  313.  
  314. ----------
  315. EV 2.1  August 92
  316.  
  317. * Finder aliases correctly open the original files
  318.  
  319. * Add/Remove routines rewritten
  320.  
  321. * Auto Modify is implemented
  322.  
  323. * "Last Position" is added to navigation menu
  324.  
  325. * File info is improved
  326.  
  327. ----------
  328. EV 2.2  November 92
  329.  
  330. * Digest format is made configurable
  331.  
  332. * Mail format is implemented
  333.  
  334. * Simple printing is enabled
  335.  
  336. * Panes are resizeable by mouse command 
  337.  
  338. * Font/Size menus are added for convenience
  339.  
  340. * "Set Bookmark" is added to navigation menu
  341.  
  342. * Clip and Copy operations are separated
  343.  
  344. * Custom SFGet and SFPut dialogs are used
  345.  
  346. ----------
  347. EV 2.3  April 93
  348.  
  349. * Apple event support: ability to open a text file with the correct application under System 7
  350.  
  351. * Filters generalize the concept of case-independent search: diacritical marks can be ignored, too
  352.  
  353. * "Search from top" option in Find dialog
  354.  
  355. * "Hide Top Window" command works very similar to the Hide command in the Application menu (Hidden window names are in italic)
  356.  
  357. * "Use Styles" menu toggles the use of styles. When something is copied while it is on, clipboard contents are also styled.
  358.  
  359. * Temporary memory is used for parsing under System 7, thus decreasing the minimum Finder partition
  360.  
  361. * When text is scrolled, an overlap with the previous window is retained
  362.  
  363. * "Print One" command is added for printing without a dialog
  364.  
  365. * "Display Selection" command makes navigation simplified
  366.  
  367. * The upper portion of a window is divided into two panes, rather than three. File Info is presented on the lower left corner (not optional)
  368.  
  369. * Menus are slightly rearranged
  370.  
  371. * Prefs dialog is greatly simplified. ~No more multiple modal dialogs~ "Auto modify", "Auto add", and "Auto remove" are separate options
  372.  
  373. * Modify menu: TAB key functional, "<<<" button for batch removal
  374.  
  375. * Clipboard is shown in default font/size
  376.  
  377. * Keypad does not change selection, it only scrolls
  378.  
  379. * Dialog names and behavior are made consistent
  380.  
  381. * Clip commands are enabled even when no clip file is open
  382.  
  383. * Pane sizes are adjusted on zoomed windows, if necessary 
  384.  
  385. * Mail format now displays the separator lines
  386.  
  387. * Empty Sender/Subject is properly handled
  388.  
  389. * Find window is not resized with changing font/size
  390.  
  391. * If a volume pointed by Finder aliases is off-line, it is recognized properly
  392.  
  393. **********
  394. Future directions
  395.  
  396. Easy View is a program still under development. 
  397.  
  398. **User comments are welcome.**
  399.  
  400. ----------
  401. Compatibility
  402.  
  403. Easy View will run under System 6.0 or later. The only reason why it will not work under earlier systems is its dependence on the Script Manager and styled TextEdit. It was tested with the Arabic system, and it should behave well with other scripts, too.
  404.  
  405. The performance is quite satisfactory even on a Mac Plus.
  406.  
  407. Easy View is compatible with System 7. It recognizes the Finder aliases and opens the original files.
  408.  
  409. ----------
  410. Easy View 2.x file format
  411.  
  412. The view file contains three arrays in the data fork:
  413.  
  414.                 FILE, CHAP, SECT
  415.  
  416. Each array contains this record:
  417.         numRows: integer;
  418.         fRecLen, fRes0: integer;
  419.         nSize: longint;
  420.         maxSize: longint;
  421.         maxRows: integer;
  422.         hName: handle;
  423.         hData: handle;
  424.  
  425. The first 10 bytes are stored in the file as a header.
  426. (maxSize=nSize and maxRows=numRows, initially)
  427.  
  428. After the header, we have the contents of hData and hName, 
  429. in that order. (If a few bytes are missing at the end of 
  430. the file, the view is still readable)
  431.  
  432. The names are just added one after the other into hName^^.
  433. Here is the interpretation of hData^^ array:
  434.  
  435.     FileData = record
  436.         fName: longint;
  437.         fParser: integer;
  438.         fTime, fLength: longint;
  439.         fRes, fStatus: longint;    {Reserved}
  440.         end;
  441.  
  442.     ChapData = record
  443.         cName: longint;
  444.         cFile, cFirst, cNumber: integer;
  445.         cRes: longint;    {Reserved}
  446.         end;
  447.  
  448.     SectData = record
  449.         sName: longint;
  450.         sStart: longint;
  451.         sLength: integer;
  452.         end;
  453.  
  454. Each record starts with a long offset to the name handle.
  455. In effect, this is a variable-size array with variable-size
  456. strings. 
  457.  
  458. The resource fork contains the preferences in 'spec' 128 (110 bytes)
  459.         fRect: Rect;    {Window Rect}
  460.         sCurChap: integer;
  461.         sCurSect: integer;
  462.         fNumLines: integer; {Number of lines in the lists}
  463.         fChapPix: integer;
  464.         fSectPix: integer;
  465.         fFontT: FileStr;    {32 bytes}
  466.         fSizeT: integer;    {Display font size just}
  467.         fJustT: integer;
  468.         fFontL: FileStr;
  469.         fSizeL: integer;    {List font size just}
  470.         fJustL: integer;
  471.         fOptions: set of SpecOption; {2 bytes}
  472.         fSignature: OSType;
  473.         fFormat: integer;
  474.         fBookMark: IndexPosition;    {4 integers, EV 2.2}
  475.         fSpacing: integer;  {EV 2.3}
  476.         fFilter: integer;
  477.  
  478. Beginning with version 2.2, 'spec' 129 contains the configuration strings for mail and digest formats. (130 bytes)
  479.         fNameKind: integer;
  480.         fDigStart: FileStr;
  481.         fDigChap: FileStr;
  482.         fDigEnd: FileStr;
  483.         fMailStart: FileStr;
  484.         
  485. Also as of EV 2.2, 'PRNT' 128 contains the data related to printing. (120 bytes)
  486.  
  487. Beginning with version 2.3, 'spec' 130 contains the style information. (96 bytes)
  488.         fStArray: array[0..7] of TextStyle;
  489.  
  490. ----------
  491. Not implemented yet
  492.  
  493. Manual sorting of files within a view is a missing feature that would be quite useful. The current file format makes the reordering within a view rather difficult. This is why the order cannot be maintained upon auto-modification of a view.
  494.  
  495. **********
  496.